import http from "../utility/request.js";


/************ 社区 start ***************/

//首页bannar
export const communityBannerListApi = (data) => http.get(`/cmsprovider/v2/collection/banner/indexlist`, { data });

//banner下方数据
export const communityKingkongListApi = (data) => http.get(`/cmsprovider/v2/collection/kingkong/list`, { data });

// 社区文章列表
export const communityListApi = (data) => http.post(`/cmsprovider/v2/community/article/list`, { data });

//社区文章详情
export const communityDetailApi = (data) => http.get(`/cmsprovider/v1/community/article/detailsList`, { data }); 

//版块数据
export const communityPlateListApi = (data) => http.get(`/cmsprovider/v2/community/article/plateList`, { data }); 

// 社区文章点赞
export const communityGiveLikeApi = (data) => http.post(`/cmsprovider/v1/community/article/giveLike`, { data });

// 社区文章取消点赞
export const communityCancelLikeApi = (data) => http.post(`/cmsprovider/v1/community/article/cancelLike`, { data });

// 社区文章删除
export const communityDelApi = (data) => http.post(`/cmsprovider/v1/community/article/del`, { data });
 
// 社区文章上传
export const communityAddApi = (data) => http.post(`/cmsprovider/v1/community/article/add`, { data });

// 社区文章举报
export const communityAppealAddApi = (data) => http.post(`/cmsprovider/v1/community/appeal/add`, { data });

//文章评论列表
export const communityCommentListApi = (data) => http.get(`/cmsprovider/v1/community/article/leveloneCommentList`, { data });

//添加评论
export const communityCommentAddApi = (data) => http.post(`/cmsprovider/v1/community/article/addComment`, { data });

//删除评论
export const communityCommentDelApi = (data) => http.post(`/cmsprovider/v1/community/article/delComment`, { data });


/************ 社区 end ***************/



/************ 七牛云 start ***************/

export const beforeUploadingApi = (data) => http.get(`/cmsprovider/v1/qiniu/get/token`, { data });

/************ 七牛云 end ***************/




/************ user start ***************/

//用户信息
export const userInfoApi = (data) => http.get(`/cmsprovider/v1/user/info`, { data });

//他人用户信息
export const otherUserInfoApi = (data) => http.get(`/cmsprovider/v1/user/other/info`, { data });

//用户关注信息-关注量 粉丝量 点赞量
export const userRelationApi = (data) => http.get(`/cmsprovider/v1/user/relation/stat`, { data }); 

//用户历史动态
export const userDynamicHistoryListApi = (data) => http.post(`/cmsprovider/v1/user/dynamic/history`, { data });

//用户操作是否 关注
export const userFollowAddApi = (data) => http.post(`/cmsprovider/v1/user/relation/modify`, { data });

//用户粉丝列表
export const userFansListApi = (data) => http.post(`/cmsprovider/v1/message/followers/list`, { data });

//用户粉丝列表已读操作
export const userFansReadAddApi = (data) => http.post(`/cmsprovider/v1/message/followers/clear`, { data });

//查询用户是否关注指定用户
export const userIfFollowApi = (data) => http.get(`/cmsprovider/v1/user/relation/check`, { data });

//登录
export const userLoginApi = (data) => http.post(`/cmsprovider/v2/user/login`, { data });

//注册
export const userRegisterApi = (data) => http.post(`/cmsprovider/v2/user/register`, { data });

//获取验证码
export const sendMsgApi = (data) => http.post(`/cmsprovider/v2/send/msg`, { data });

//检测手机号是否注册
export const checkMobileRegisteredApi = (data) => http.post(`/cmsprovider/v2/user/check/register`, { data });

/************ user end ***************/



/************ 消息 start ***************/

//未读的点赞列表
export const unreadLikeListApi = (data) => http.get(`/cmsprovider/v1/message/giveLike/unreadList`, { data });

//已读点赞or 一键已读所有点赞
export const readLikeAddApi = (data) => http.post(`/cmsprovider/v1/message/giveLike/clearList`, { data });

//删除所有点赞
export const delAllLikeApi = (data) => http.post(`/cmsprovider/v1/message/giveLike/delList`, { data });

//未读的评论列表
export const unreadcommentsListApi = (data) => http.get(`/cmsprovider/v1/message/comments/unreadList`, { data });

//已读评论or 一键已读所有评论
export const readcommentsAddApi = (data) => http.post(`/cmsprovider/v1/message/comments/clearList`, { data });

//删除所有评论
export const delAllCommentApi = (data) => http.post(`/cmsprovider/v1/message/comments/delList`, { data });

//未读信息
export const unreadMessageAllApi = (data) => http.get(`/cmsprovider/v1/message/notification/get`, { data });

//系统消息
export const systemMessageListApi = (data) => http.get(`/cmsprovider/v1/message/systemsg/list`, { data });


/************ 消息 end ***************/





/************ 更新维护 start ***************/

// 维护接口
export const maintainApi = (data) => http.get(`/v1/xxx/xxx`, { data });

// 更新接口
export const updateApi = (data) => http.post(`/cmsprovider/v2/config/system/update`, { data });

/************ 更新维护 end ***************/
